var laydate = layui.laydate;
laydate.render({
    elem: '#ftime',
    type: 'datetime'
});

$("form").submit(function (event) {
    event.preventDefault();
    var orderId = $("input[name='orderId']").val();
    var content = $("input[name='content']").val();
    var status = $("input[name='status']:checked").val();
    var ftime = $("input[name='ftime']").val();
    if (content == "" || content == null || content == undefined) {
        return false;
    }
    $.ajax({
        type : 'POST',
        dataType : "json",
        contentType: "application/json;charset=UTF-8",
        url : '/lgs/orderTrace/addTrack',
        data: JSON.stringify({orderId: orderId, content: content, status: status, ftime: ftime}),
        success : function(result) {
            debugger;
            if (result.code == 0) {
                parent.layer.msg("操作成功");
                parent.showPanelTrack();
                layer.closeAll();
                var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                parent.layer.close(index);
            } else {
                parent.layer.msg(result.msg);
            }
        },
        error: function () {
        }
    });
});